﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_NewsList.aspx.cs" Inherits="admin_Admin_NewsList" %>

<%@ Register Src="../Controls/AdminCheck.ascx" TagName="AdminCheck" TagPrefix="uc1" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>后台管理系统</title>
    <link href="Images/css1/css.css" rel="stylesheet" type="text/css">
</head>
<SCRIPT language=javascript>
<!--
var displayBar=true;
function switchBar(obj){
	if (displayBar)
	{
		parent.frame.cols="0,*";
		displayBar=false;
		obj.value="打开左边管理菜单";
	}
	else{
		parent.frame.cols="195,*";
		displayBar=true;
		obj.value="关闭左边管理菜单";
	}
}


//-->
</SCRIPT>
<body>
<form runat="server"> 
<table class="table" cellspacing="1" cellpadding="2" width="auto" align="center" border="0">
  <tbody>
    <tr>
      <th class="bg_tr" align="left" colspan="4" height="25"> <span style="font-size:18px;">新闻系统</span>   
      <input onClick="switchBar(this)" type="button" value="关闭左边管理菜单" name="SubmitBtn" />&nbsp;&nbsp;<asp:CheckBox 
              ID="CheckBox1" runat="server" Text="匹配内链" />
&nbsp;<asp:CheckBox ID="CheckBox2" runat="server" Text="关联相关文章" />
          <asp:Button ID="Button3" runat="server" onclick="Button3_Click" 
              Text="生成所有" Width="180px" />
                </th>
    </tr>
    <tr>
      <td class="td_bg" colspan="4">    
      <asp:GridView ID="NewsList" runat="server"  AutoGenerateColumns="False" OnRowDataBound="NewsList_RowDataBound" HorizontalAlign="Center" OnRowDeleting="NewsList_RowDeleting" >
                        <Columns>
                           <asp:TemplateField HeaderText="删除"  HeaderStyle-Width="40" ItemStyle-HorizontalAlign="Center" >
                                <ItemTemplate>
                                    <asp:CheckBox ID="del" runat="server" />
                                </ItemTemplate>
                           </asp:TemplateField>
                            <asp:BoundField DataField="Ntitle" HeaderText="标题" ReadOnly="true" HeaderStyle-Width="300" ItemStyle-Width="300" /> 
                            <asp:BoundField DataField="Nkey" HeaderText="关键字" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="200" />
                            <asp:TemplateField HeaderText="添加时间"  HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Center" >
                                <ItemTemplate>
                                    <asp:Literal ID="Literal1" runat="server" Text='<%# Eval("Ntime","{0:yyyy-M-dd}") %>'></asp:Literal>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField HeaderText="删除" ShowDeleteButton="True" HeaderStyle-Width="40" ItemStyle-HorizontalAlign="Center" />
                            <asp:HyperLinkField HeaderText="详细" Text="详细" DataNavigateUrlFormatString="~/admin/Admin_NewsUpdate.aspx?id={0}" DataNavigateUrlFields="NID"  HeaderStyle-Width="40" ItemStyle-HorizontalAlign="Center" />
                        </Columns>
                        <HeaderStyle BackColor="#E4F1FA" Font-Bold="True" ForeColor="#006699" />
                       </asp:GridView></td>
    </tr>
        <tr> 
      <td class="bg_tr" align="left" colspan="4" height="26">
      <div style="float:left;"> <asp:Button ID="Button2" runat="server" Text="全选" OnClick="Button2_Click"   CssClass="input_1" />
      <asp:Button ID="Button1" runat="server" Text="删除" OnClick="Button1_Click"  CssClass="input_1" /></div>
      <webdiyer:AspNetPager ID="AspNetPager1" runat="server" pagesize="15"  CssClass="paginator"
         onpagechanged="AspNetPager1_PageChanged" 
         CurrentPageButtonPosition="Center" 
         CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页显示%PageSize%条信息" 
         FirstPageText="首页" LastPageText="尾页" LayoutType="div" NextPageText="下一页" 
         PageIndexBoxType="textbox" PagingButtonLayoutType="Span" 
         PrevPageText="上一页" ShowCustomInfoSection="Left" SubmitButtonText="Go" 
         ShowPageIndexBox="Always"  TextBeforePageIndexBox="转到第" TextAfterPageIndexBox="页" >
     </webdiyer:AspNetPager>

    </td>
    </tr>
  </tbody>
</table>
    <uc1:AdminCheck ID="AdminCheck1" runat="server" />

</form>

</body>



</html>
